Skip to content

meta(changelog): Update changelog for 10.51.0#20599

Merged
s1gr1d merged 86 commits intomasterfrom
prepare-release/10.51.0
Apr 29, 2026
Merged

meta(changelog): Update changelog for 10.51.0#20599
s1gr1d merged 86 commits intomasterfrom
prepare-release/10.51.0

Conversation

@s1gr1d
Copy link
Copy Markdown
Member

@s1gr1d s1gr1d commented Apr 29, 2026

No description provided.

nikolovlazar and others added 30 commits April 13, 2026 15:30
…github.com:getsentry/sentry-javascript into lazarnikolov/js-2140-tanstack-start-tunnel-adapter
Align sentryTanstackStart tests with TunnelRouteOptions.path and annotate
spy case with SentryTanstackStartOptions so options match the public API.

Made-with: Cursor
[Gitflow] Merge master into develop
After looking a bit at what the slowest browser-integration-tests are, I
found an easy-to-fix pattern in our tests - we had _a lot_ of tests
there that set some arbitrary `idleTimeout` to the
`browserIntegrationTest`. This massively made these tests slower as it
takes much longer to flush any pageload span. Many test runtimes reduced
from 10-20s to 1-5s due to this change. A few places remain where this
seems to be necessary, but there are way fewer now.

FYI 1000ms is the default, we also had some defining this for some
reason, I also removed those to be more consistent.
Use optional chaining on `.length` to collapse the redundant existence + length-guard ternary into a single expression.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Applies the same fix as in #19924

closes #18797

Co-authored-by: Julien Blatecky <julien.blatecky@hey.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This PR just isolates the mundane changes needed for a new SDK to keep
the next stacked PRs clean, it adds the Nitro SDK to the monorepo.

This PR is a base of a stack, the stacked PRs will be merged into it. I
thought this will be easier to review.

---

**This PR is part of a stack:**

- #20358
- #19224 👈
- #19225 
- #19304

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Covers the `{ path, allowedDsns }` shape of `tunnelRoute` end-to-end
alongside the existing dynamic/static/custom variants, exercising the
build-time serialization of `allowedDsns` into the generated virtual
route module. Also refactors the `tunnelRoute` resolution in
`vite.config.ts` from a nested ternary to a switch for readability.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The tunnel variants run independently through sentryTest.variants in
CI, so the chained `test:assert` was redundant and slow to run locally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…k-start-tunnel-adapter

Tunnel route helper + Dynamic tunnel route generator for TanStack Start React
There is no stable stream of Nitro 3 canary builds yet, so no point in
having this. I will add it back once we have a stable stream of builds,
likely after the full v3 release.

I probably had it at one point then didn't remove it properly before
merging #19224

Closes #20472
s1gr1d and others added 14 commits April 29, 2026 09:47
If there is only one `bin` script (which is the case for Remix and
Profiling), it's possible to just run `npx @sentry/remix` and it will
run this one script. But to make it more clear what's going to happen,
we're introducing an argument `--upload-sourcemaps`.


**Remix:** The script usage changes so we can rename the `bin` script in
the next major version.

**Profiling:** The script is going to be deleted and deprecation notices
are added.

Related to: #20422
…#20556)

We accidentally added a `node` dependency to an export from
`opentelemetry` package, leading to problems for users using this in a
browser environment.

This PR adds conditional exports to the opentelemetry package, where for
`browser` targets we have stubs for the node-only thing. This should
generally work the same as before, but stop failing builds in browser
envs.

I had to adjust browser integration tests for this a bit, as they did
some unnecessary aliasing which prevented webpack from using normal
conditional exports. We are simply doing less now and doing regular
dependency resolution which should work as expected (hopefully).
This updates the CODEOWNERS config to accomodate our new groups.
This PR adds instrumentation for LangGraph's `createReactAgent` API.

## createReactAgent wrapping
- Extracts agent name, LLM model, and tools from params
- Wraps compiled graph's `invoke()` with `invoke_agent` span
- Wraps tool `invoke()` with `execute_tool` spans (name, type,
description, arguments, result)
- Injects LangChain callback handler + `lc_agent_name` +
`__sentry_langgraph__` metadata at invoke level for chat span creation
and agent name propagation to all child spans
- Suppresses `StateGraph.compile` instrumentation inside
`createReactAgent` to avoid duplicate spans

## LangChain callback handler improvements
- Reads `gen_ai.agent.name` from `metadata.lc_agent_name` (convention
from newer LangGraph `createAgent`, adopted for our supported versions)
- Suppresses chain and tool callback spans inside agent context (based
on `metadata.__sentry_langgraph__` presence) to avoid duplicates with
our direct instrumentation
- Extracts tool definitions from `extraParams` in `handleChatModelStart`
and sets `gen_ai.request.available_tools` on chat spans
- Uses `runName` for tool name in `handleToolStart` (set by LangChain's
`StructuredTool.call()`) — fixes `unknown_tool` issue
- Adds `gen_ai.operation.name` to tool spans
- Extracts `.content` from ToolMessage objects in `handleToolEnd`
instead of serializing the full wrapper
- `addToolCallsAttributes` now prefers `message.tool_calls` (LangChain's
normalized format) over scanning `message.content` for Anthropic-style
`tool_use` items, fixing duplicate tool calls on Anthropic chat spans.
Falls back to `message.content` scanning for older LangChain versions.

## OTel module patching
- Patches `@langchain/langgraph/prebuilt` for `createReactAgent` (ESM +
CJS file patches for `dist/prebuilt/index.cjs`)

## Exports
- `instrumentCreateReactAgent` from core, browser, cloudflare

Closes: #19372
…SN` (#20528)

If this is set (which should generally be the case when using the
layer), we want to only allow this DSN to be forwarded.

If not set, it does not validate but warn that this is not validated.

---------

Co-authored-by: Andrei <168741329+andreiborza@users.noreply.github.com>
Saw this flake once or twice, just increasing timeout for cron tests to
allow for slow runner startup etc.
…ame (#20589)

Today, we got a bunch of flaky CI issues for e.g. failing cache or
playwright installation. While these are also kind of flakes, the issues
are not super actionable and it gets a bit noisy. I'd opt to not create
an issue if we cannot identify a concrete test that is flaking. We miss
out on some things being auto-reported here but that's also OK I'd say.

Closes #20319
Closes #20557
Closes #20493
Closes #20492
Closes #20469
Closes #20470
…handlers (#20554)

Previously, Hono `.route()` was patched by checking for an `'ALL'`
handler (as those are used as middleware) to detect middleware in Hono
sub-apps. But this incorrectly treated `.all()` final handlers as
middleware. This broke error capture for `.all()` error routes (the
wrapped handler caught and marked the error, preventing responseHandler
from capturing it).

Now we use an arity heuristic (arity = number of params): middleware
accepts `(context, next)`, while route handlers accept only `(context)`.

Also added more middleware-related E2E test scenarios and route-patterns
tests. Basically adding test scenarios from the Node integration test to
the E2E test:
https://github.com/getsentry/sentry-javascript/blob/5d0d14531511fcd703438e072723ef98cd700ea3/dev-packages/node-integration-tests/suites/tracing/hono/test.ts

Part of Project:
#15260
Builds onto: #20449
Closes #20553

The clanker identified this as possible problem here:
> docker compose up --wait waits on the container healthcheck
(pg_isready inside the DB). On busy CI, localhost:5444 can still refuse
connections briefly afterward, so the scenario could hit Postgres before
it was reachable from the host and fail or behave inconsistently → flaky
CJS (and the same class of failure for the other scenarios).
Found some other places in browser-integration-tests that could
theoretically be flaky due to when we start listening for events vs.
when we navigate.
@s1gr1d s1gr1d requested review from a team as code owners April 29, 2026 12:13
@s1gr1d s1gr1d requested review from JPeer264 and logaretm April 29, 2026 12:14
}

sentryTest('should capture a `connection.rtt` metric.', async ({ getLocalTestUrl, page }) => {
sentryTest('should capture a `connection.rtt` metric. xxx', async ({ getLocalTestUrl, page }) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug text "xxx" left in test name

Low Severity

The test name 'should capture a \connection.rtt` metric. xxx'contains leftover debug textxxx` that appears to have been accidentally committed. This pollutes test output and makes the test suite look unprofessional.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a33bf99. Configure here.

@s1gr1d s1gr1d force-pushed the prepare-release/10.51.0 branch from a33bf99 to 6cfa338 Compare April 29, 2026 12:20
Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
@s1gr1d s1gr1d force-pushed the prepare-release/10.51.0 branch from 6cfa338 to 3be99a9 Compare April 29, 2026 12:31
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3be99a9. Configure here.


const middlewareSpans = spans.sort((a, b) => (a.start_timestamp ?? 0) - (b.start_timestamp ?? 0));

expect(middlewareSpans).toHaveLength(2);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing span filter in refactored middleware test

Medium Severity

The refactored "multiple middleware" test lost the .filter() call that previously selected only middleware spans (span.op === 'middleware.hono' && span.origin === 'auto.middleware.hono'). Now middlewareSpans contains all transaction spans, and the toHaveLength(2) assertion checks the total span count rather than the middleware span count. This makes the test fragile and could cause false failures on runtimes (like Node/OTel) that produce additional non-middleware spans.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3be99a9. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 26.16 kB added added
@sentry/browser - with treeshaking flags 24.63 kB added added
@sentry/browser (incl. Tracing) 44.11 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 46.16 kB added added
@sentry/browser (incl. Tracing, Profiling) 49.06 kB added added
@sentry/browser (incl. Tracing, Replay) 83.46 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 72.94 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 88.14 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 100.79 kB added added
@sentry/browser (incl. Feedback) 43.4 kB added added
@sentry/browser (incl. sendFeedback) 30.96 kB added added
@sentry/browser (incl. FeedbackAsync) 36.14 kB added added
@sentry/browser (incl. Metrics) 27.44 kB added added
@sentry/browser (incl. Logs) 27.59 kB added added
@sentry/browser (incl. Metrics & Logs) 28.28 kB added added
@sentry/react 27.9 kB added added
@sentry/react (incl. Tracing) 46.35 kB added added
@sentry/vue 31.03 kB added added
@sentry/vue (incl. Tracing) 45.95 kB added added
@sentry/svelte 26.18 kB added added
CDN Bundle 28.84 kB added added
CDN Bundle (incl. Tracing) 46.71 kB added added
CDN Bundle (incl. Logs, Metrics) 30.25 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 47.8 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 69.34 kB added added
CDN Bundle (incl. Tracing, Replay) 83.88 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 84.94 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 89.69 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 90.78 kB added added
CDN Bundle - uncompressed 84.55 kB added added
CDN Bundle (incl. Tracing) - uncompressed 139.68 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 88.75 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 143.14 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 212.71 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 257.49 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 260.93 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 271.18 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 274.62 kB added added
@sentry/nextjs (client) 48.84 kB added added
@sentry/sveltekit (client) 44.56 kB added added
@sentry/node-core 58.96 kB added added
@sentry/node 170.25 kB added added
@sentry/node - without tracing 96.82 kB added added
@sentry/aws-serverless 113.69 kB added added
@sentry/cloudflare (withSentry) - minified 164.13 kB added added
@sentry/cloudflare (withSentry) 415.2 kB added added

Comment thread CHANGELOG.md

### Other Changes

- deps(minimatch): Upgrade patch version to use new `brace-expansion` peer-dep ([#20198](https://github.com/getsentry/sentry-javascript/pull/20198))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's an internal change

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm or maybe not lol

@s1gr1d s1gr1d merged commit b3cabee into master Apr 29, 2026
251 checks passed
@s1gr1d s1gr1d deleted the prepare-release/10.51.0 branch April 29, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants